﻿using System;

public partial class aspx_news_one : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (this.Request.QueryString["id"] == null)
            {
                Response.Redirect("~/");
            }
            try
            {
                int id = int.Parse(this.Request.QueryString["id"]);
                using (ds_名师讲堂TableAdapters.tb_新闻中心TableAdapter da = new ds_名师讲堂TableAdapters.tb_新闻中心TableAdapter())
                {
                    this.rpt_oneNews.DataSource = da.GetDataBy新闻ID(id);
                }
                this.rpt_oneNews.DataBind();
            }
            catch (Exception )
            {
                Response.Redirect("~/");
            } 
        }
    }
}